import commonJS from '../../utils/common.js'

const state = {
	isLogin:false,
	token:commonJS.getToken(),
}

const mutations = {
	// 存储token
	SET_TOKEN(state,token){
		commonJS.setToken(token);
		state.token = token;
	},
	// 退出登陆
	LOGOUT(state){
		state.token = '';
		state.isLogin = false;
		commonJS.removeToken();
		commonJS.removeStrongUser();
	}
}

const actions = {
	
}

export default {
	namespaced:true,
	state,
	mutations,
	actions,
}